package com.jyw.business.de.domain.vo.web;

import com.jyw.business.de.domain.dto.web.DemandOperDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@ApiModel("记录需求立项审核操作流程实体")
@NoArgsConstructor
public class DemandProjectAuditVO {

    @ApiModelProperty("审核状态 1驳回 2通过")
    private String projectState;

    @ApiModelProperty("驳回原因")
    private String reason;

    @ApiModelProperty("项目号")
    private String projectCode;

    @ApiModelProperty("项目id")
    private Long id;

    /**
     * 审核通过
     * @param projectCode
     * @param id
     */
    public DemandProjectAuditVO(String projectCode, Long id) {
        setProjectState("2");
        this.projectCode = projectCode;
        this.id = id;
    }

    public DemandProjectAuditVO(DemandOperDto dto) {
        setProjectState("1");
        setReason(dto.getReason());
    }
}
